/**********************************************************************
 Copyright (C) 2011 Jaakko Vuori

 This file is part of ShredMate.
 For more information, see <http://code.google.com/p/shredmate/>

 ShredMate is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 ShredMate is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with ShredMate.  If not, see <http://www.gnu.org/licenses/>.
 **********************************************************************/

#ifndef MP3PCMBUFFER_H
#define MP3PCMBUFFER_H

#include <QString>
#include "shredmateengine_global.h"

#include "abstractpcmbuffer.h"

class SHREDMATEENGINESHARED_EXPORT MP3PCMBuffer : public AbstractPCMBuffer
{
public:
    MP3PCMBuffer(QString fileName);
    void open();

public:
    int channels() const;
    int bitRate() const;
    qint64 length() const;
    const char* data() const;
    QByteArray hash() const;

private:
    QString m_fileName;
    int m_channels;
    long m_bitRate;
    QByteArray m_decodedData;
    QByteArray m_hash;
};

#endif // MP3PCMBUFFER_H
